const state = {
  list: [],
  page: {},
  adverUser: [],
  adverUserPage: {}
}

const actions = {
  save_list: ({ commit }, payload) => {
    commit('SAVELIST', payload)
  },
  saveAdverUser: ({ commit }, payload) => {
    commit('SAVEADVERUSER', payload)
  }
}

const mutations = {
  SAVELIST: (state, payload) => {
    state.list = payload.result,
    state.page = {
      size: 10,
      number: payload.number || 1,
      total: payload.resultNum
    }
  },
  SAVEADVERUSER: (state, payload) => {
    state.adverUser = payload.result,
    state.adverUserPage = {
      size: 10,
      number: payload.number || 1,
      total: payload.resultNum
    }
  }
}



export default {
  state,
  actions,
  mutations
}